#ifndef ADDUSER_H
#define ADDUSER_H

#include <QDialog>

#include <api/systemManager/rolemanagerapi.h>


namespace Ui {
class AddUser;
}

class AddUser : public QDialog
{
    Q_OBJECT

public:
    explicit AddUser(QString roleId,QWidget *parent = nullptr);
    ~AddUser();

private slots:
    void on_btn_cancel_clicked();

    void on_btn_search_clicked();

    void on_btn_reset_clicked();

    void on_comboBox_pageItem_currentIndexChanged(int index);

    void on_btn_pervious_clicked();

    void on_btn_next_clicked();

    void on_btn_ok_clicked();

    void on_lineEdit_gotoPage_returnPressed();

signals:
    void authSuccess();

private:
    Ui::AddUser *ui;
    QString roleId;
    QList<User> userList;
    RoleManagerApi roleManagerApi;
    int pageNum;
    int pageSize;
    int total;
    int totalPage;
    int currentPage;

    void init();
    void getList();
    void initTable();
    void initPageInfo();
};

#endif // ADDUSER_H
